+2008-05-25 Jan Arne Petersen <jpetersen@jpetersen.org>
+
+ * gtk/gtklabel.c: (get_layout_location): Subtract logical.x from x to
+ fix the wrong position for right and center justified labels with
+ logical.x > 0 (#530255).
+
2008-05-25 Jan Arne Petersen <jpetersen@jpetersen.org>
* gtk/gtkfilechooserdefault.c:
GtkLabelPrivate *priv;
gfloat xalign;
gint req_width, x, y;
+ PangoRectangle logical;
misc = GTK_MISC (label);
widget = GTK_WIDGET (label);
else
xalign = 1.0 - misc->xalign;
+ pango_layout_get_pixel_extents (label->layout, NULL, &logical);
+
if (label->ellipsize || priv->width_chars > 0)
{
int width;
- PangoRectangle logical;
width = pango_layout_get_width (label->layout);
- pango_layout_get_pixel_extents (label->layout, NULL, &logical);
req_width = logical.width;
if (width != -1)
x = MAX (x, widget->allocation.x + misc->xpad);
else
x = MIN (x, widget->allocation.x + widget->allocation.width - misc->xpad);
+ x -= logical.x;
y = floor (widget->allocation.y + (gint)misc->ypad
+ MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign),